package com.cf.base.leak.tool;

/**
 * @author yangji
 */
public class GcTrigger {

    public static void runGc() {
        Runtime.getRuntime().gc();
        enqueueReferences();
        System.runFinalization();
    }

    private static void enqueueReferences() {
        try {
            Thread.sleep(100);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
